package cn.iocoder.yudao.module.api.brokerage.level.enums;

import cn.iocoder.yudao.framework.business.basic.enums.EnumValuable;
import com.baomidou.mybatisplus.annotation.EnumValue;
import lombok.Getter;
import lombok.RequiredArgsConstructor;

/**
 * <pre>
 * OOoO0OOoO0OOOooo0oOOOO0OOOOO0oooOO0ooOOO0Ooooo0OOOOo0ooooO0OOooo0Ooooo0OOOOO
 * 推广人员等级类型
 * OOoO0OOoO0OOOooo0oOOOO0OOOOO0oooOO0ooOOO0Ooooo0OOOOo0ooooO0OOooo0Ooooo0OOOOO
 * </pre>
 *
 * @author 山野羡民（1032694760@qq.com）
 * @since 2025/01/09
 */
@RequiredArgsConstructor
@Getter
public enum BrokerageLevelTypeEnum implements EnumValuable {
    NORMAL(0, "普通用户"),
    VIP(1, "会员"),
    AGENCY(2, "招商人员"),
    MERCHANT(3, "商家"),
    ;

    @EnumValue
    private final Integer value;
    private final String name;

    public static BrokerageLevelTypeEnum valueOf(Integer value) {
        for (BrokerageLevelTypeEnum item : values()) {
            if (item.getValue().equals(value)) {
                return item;
            }
        }
        return NORMAL;
    }

}
